<?php

class DefaultController extends Controller
{
	public function actionIndex()
	{
		if(isset($_POST['ajax']))
		{
			
			Yii::app()->end();
		}
		
		echo 'sdfsf';
		
		$this->render('index');
	}
	
	public function actionRand()
	{
//		if(isset($_POST['ajax']))
//		{
			$oWords = new Words();
			$row = $oWords->random()->find();
			
			print_r($row['translate']);
			
			Yii::app()->end();
//		}
		
		$this->render('index');
	}
}